#ifndef GUIEVENTDISPATCHER_H
#define GUIEVENTDISPATCHER_H

#include "gui/graphicview.h"
#include "gui/guievent.h"

#include "fastsig/fastsig.hpp"

namespace gui
{
	/**
	*   GUI Signal repository
	*/
	class GuiEventDispatcher
	{
		typedef fastsig::signal<void(GuiEvent* ev)> event_signal_type ;

		typedef fastsig::signal<void()>						paint_signal_type ;
		typedef fastsig::signal<void(const MouseEvent* ev)> mouse_signal_type ;
		typedef fastsig::signal<void(const SizeEvent* ev)>	size_signal_type ;

		
		std::vector<event_signal_type>	event_signals_storage;
		
		paint_signal_type				paint_sig; 
		mouse_signal_type				mouse_sig; 
		size_signal_type				size_sig; 

	public:
		GuiEventDispatcher() ;
		virtual ~GuiEventDispatcher() ;

		void emitPaintEvent()const ;
		void emitResizeEvent(const SizeEvent& sizeevent) const ;
		void emitMouseEvent(const MouseEvent& mouseevent) const ;


	protected:

	private:
	};

}
#endif // GUIEVENTDISPATCHER_H
